﻿using AutoMapper;
using Fonour.Application.Dtos;
using Fonour.Domain;
using Fonour.Domain.Entities;
using System;
using System.Collections.Generic;
using System.Text;

namespace Fonour.Application.Mappers
{
    public class AppMapperProfile : Profile
    {
        public AppMapperProfile()
        {
            CreateMap<Menu, MenuDto>(MemberList.Destination)
                .ReverseMap();
            CreateMap<Department, DepartmentDto>(MemberList.Destination)
                .ReverseMap();
            CreateMap<Role, RoleDto>(MemberList.Destination)
                .ReverseMap();
            CreateMap<RoleMenu, RoleMenuDto>(MemberList.Destination)
                .ReverseMap();
            CreateMap<User, UserDto>(MemberList.Destination)
                .ReverseMap();
            CreateMap<UserRole, UserRoleDto>(MemberList.Destination)
                .ReverseMap();

            CreateMap(typeof(PageEntity<>), typeof(PageDto<>))
                .ReverseMap();
        }
    }
}
